--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
meshchatx/src/backend/colour_utils.py 159b2358f1913abb25eafcc3e23b1777f2ed9f15 (159b2358) Text, 327 B
T8b949e# SPDX-License-Identifier: 0BSD AND MIT
Tff7b72from T7ee787__future__ Tff7b72import Te6edf3annotations
Tff7b72class T56d364ColourUtilsTb4b4b4:
Tf0883e@staticmethod
Tff7b72def Td2a8ffhex_colour_to_byte_arrayTb4b4b4(Te6edf3hex_colourTb4b4b4)Tb4b4b4:
T8b949e# remove leading "#"
Te6edf3hex_colour Tff7b72= Te6edf3hex_colourTff7b72.Td2a8fflstripTb4b4b4(Ta5d6ff"Ta5d6ff#Ta5d6ff"Tb4b4b4)
T8b949e# convert the remaining hex string to bytes
Tff7b72return Tffa657bytesTff7b72.Td2a8fffromhexTb4b4b4(Te6edf3hex_colourTb4b4b4)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────